﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;

namespace Bricks.MiuiThemeMaker.MiuiThemeMaker.Utility
{
    /*********************************************************
     * 1.版权：积木工场 Bricks Factory
     * 2.作用：通用操作类
     * 3.创建人：罗泽新
     * 4.创建日期：2012-06-28
     * 5.最后修改人：罗泽新
     * 6.最后修改日期：2012-06-28
     * 7.修改项目：
     * *******************************************************/
    public class UiUtility
    {
        /// <summary>
        /// 将某个元素新增到Grid
        /// </summary>
        /// <param name="grid"></param>
        /// <param name="ui"></param>
        public static void AddToGrid(Grid grid, UIElement ui)
        {
            grid.Children.Add(ui);
        }

        /// <summary>
        /// 移除Grid的某个元素
        /// </summary>
        /// <param name="grid"></param>
        /// <param name="ui"></param>
        public static void RemoveFromGrid(Grid grid, UIElement ui)
        {
            grid.Children.Remove(ui);
        }
    }
}
